package com.gw.smscheck.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class TimeUtil {

    /**
     *
     *
     * @return
     */
    public static String timeAddMinute(String sourceTime){
        String resultStr = "";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm");
        try {
            Date time = sdf.parse(sourceTime);
            Calendar c = Calendar.getInstance();
            c.setTime(time);
            c.add(Calendar.MINUTE,1);
            resultStr = sdf.format(c.getTime());
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return resultStr;
    }
}
